Blockchain is a novel application of computer technologies including distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm, etc. A blockchain requires the states of all blockchain nodes (including the state of databases) to be the same. Therefore when a new transaction is produced (i.e., new data is generated) at a blockchain node, the new data needs to be synchronized with all blockchain nodes, and all blockchain nodes need to verify the transaction data.
In conventional technologies, a typical verification method used by blockchain nodes on data is to verify through a bucket-tree-based checksum (e.g., a Hash value). For example, data in the blockchain nodes of “fabric” (an existing blockchain application) is stored in a Merkle tree structure, which comprises one or more leaf nodes (i.e., the buckets). A single computation device (e.g., a terminal device or server) may be used for the blockchain nodes to determine a checksum (e.g., a Hash value) of the above data. For example, a computation device may traverse each leaf node, sort the data of the leaf nodes, splice them into a character string, and compute a checksum of the character string as the checksum of the data of the corresponding leaf node. Then, based on the checksum of the data of each leaf node, the computation device may compute a root checksum (e.g., a root Hash value) of the Merkle tree, which is a checksum of the data in the blockchain node, and the above data may be verified based on this checksum.
However, since only one single computation device is used for computing the root checksum of data in the blockchain nodes and each computation is completed by splicing data of each leaf node into a character string, it will take a long time for a single computation device to complete the above-described computation process when the cumulative data amount in one or more leaf nodes is very high (e.g., 10 million pieces of data). That results in a low computation efficiency, or may even prolong the time for generating blocks, and impedes normal operations of a blockchain.